#ifndef __STORMWIDGET_CONFIGMANAGE_CDOWNLOADTHREAD_DOWNLOADTHREAD_H
#define __STORMWIDGET_CONFIGMANAGE_CDOWNLOADTHREAD_DOWNLOADTHREAD_H
#include "SingleThread.h"
#include "IWinNetEvent.h"
#include "CommonDefine.h"
#include "WinNetHttp.h"

class CDownloadThread:public CSingleThread
{
public:
	explicit CDownloadThread(TASKTYPE nTaskType,CStdString strSource,CStdString strDestination);
	virtual ~CDownloadThread(void);
	UINT __stdcall DefThreadProc();
	void Start(IWinNetEvent* pCallBack);
	void Cancel();
protected:
	BOOL CheckFileExist(LPCTSTR pstrFileName, BOOL bCanZero);
private:
	CStdString m_strSourcePath;
	CStdString m_strDestinationPath;
	IWinNetEvent* m_pCallBack;
	TASKTYPE m_nTaskType;
	CWinNetHttp* m_pWinNetHttp;
};

#endif //__STORMWIDGET_CONFIGMANAGE_CDOWNLOADTHREAD_DOWNLOADTHREAD_H
